package com.vimaltuts.mycontacts;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class SQLiteHelper extends SQLiteOpenHelper {

	public SQLiteHelper(Context context, String name,
			CursorFactory factory, int version) {
		super(context, name, factory, version);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		String createQuery = "CREATE TABLE "+Contacts.TABLE+" ( _id integer primary key autoincrement, "+Contacts.NAME+", "+Contacts.PHONE+", "+Contacts.MAIL+", "+Contacts.FB+", "+Contacts.SKYPE+
				", "+Contacts.TYPE+", "+Contacts.IMAGE+");";
		
		db.execSQL(createQuery);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

	}

}
